<!-- Modal -->
<div class="modal-dialog wide" style="width: 550px;">
<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
            <#if tdHzb??>
                <#if tdHzb.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
        </h4>
    </div>
    <div class="modal-body">
        <div id="errorMessage"><#include "../../message.ftl" /></div>
        <form class="form-horizontal" role="form" id="tdHzbForm" method="post" action="${absoluteContextPath}/td/tdHzb/save">
            <#if tdHzb??>
                <#if tdHzb.id??>
                    <input type="hidden" name="id" value="${tdHzb.id}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
            <div class="row">
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="id" value="${tdHzb.id!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">部门</label>
                <div class="col-sm-6">
                    <input name="orgName" value="${tdHzb.orgName!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">姓名</label>
                <div class="col-sm-6">
                    <input name="userName" value="${tdHzb.userName!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">启动日期</label>
                <div class="col-sm-6">
                    <input name="dateStart" value="${tdHzb.dateStart!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">累计天数</label>
                <div class="col-sm-6">
                    <input name="ZTs" value="${tdHzb.ZTs!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">累计时数</label>
                <div class="col-sm-6">
                    <input name="ZSs" value="${tdHzb.ZSs!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">日均累计</label>
                <div class="col-sm-6">
                    <input name="averageDaily" value="${tdHzb.averageDaily!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">预期用时</label>
                <div class="col-sm-6">
                    <input name="expectedTime" value="${tdHzb.expectedTime!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">带动家人</label>
                <div class="col-sm-6">
                    <input name="driveFamily" value="${tdHzb.driveFamily!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">本月日均</label>
                <div class="col-sm-6">
                    <input name="BRj" value="${tdHzb.BRj!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">上月日均</label>
                <div class="col-sm-6">
                    <input name="SRj" value="${tdHzb.SRj!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">本月累计天数</label>
                <div class="col-sm-6">
                    <input name="BLjts" value="${tdHzb.BLjts!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">上月累计天数</label>
                <div class="col-sm-6">
                    <input name="SLjts" value="${tdHzb.SLjts!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">本月中断天数</label>
                <div class="col-sm-6">
                    <input name="BZcts" value="${tdHzb.BZcts!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">上月中断天数</label>
                <div class="col-sm-6">
                    <input name="SZcts" value="${tdHzb.SZcts!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">本月中断天数</label>
                <div class="col-sm-6">
                    <input name="BZdts" value="${tdHzb.BZdts!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">上月中断天数</label>
                <div class="col-sm-6">
                    <input name="SZdts" value="${tdHzb.SZdts!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">本月日均</label>
                <div class="col-sm-6">
                    <input name="BJh" value="${tdHzb.BJh!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">上月日均</label>
                <div class="col-sm-6">
                    <input name="SJh" value="${tdHzb.SJh!''}" type="text" class="form-control"/>
                </div>
            </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button type="button" class="btn btn-primary" onclick="save();">保存</button>
    </div>
</div>
</div>
<script>
    function save() {
        $("#" + "tdHzbForm").ajaxSubmit({
            success:function(data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId:"showMessage",message:"信息保存成功！",type:"success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId:"errorMessage",message:"<strong>错误信息</strong>：" + data.returnMsg,type:"error"});
                }
            }
        });
    }
</script>